//
//  GVMessageOrderNoticeView.m
//  GmallVIP
//
//  Created by yemeihua on 15/11/4.
//  Copyright © 2015年 yemeihua. All rights reserved.
//

#import "GVMessageOrderNoticeView.h"

@implementation GVMessageOrderNoticeView

- (instancetype)init
{
    if(self = [super init])
    {
        CGFloat mainWidth = kScreenHeight - 18.0 - 18.0 - 48.0 - 24.0;

        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = [UIFont systemFontOfSize:14];
        _titleLabel.numberOfLines = 0;
        _titleLabel.preferredMaxLayoutWidth = mainWidth;
        [self addSubview:_titleLabel];
        
        _goButton = [[UIButton alloc] init];
        _goButton.backgroundColor = [UIColor blackColor];
        _goButton.titleLabel.font = [UIFont systemFontOfSize:14];
        [_goButton setTitle:@"查看订单" forState:UIControlStateNormal];
        [_goButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _goButton.layer.cornerRadius = 4.0;
        _goButton.layer.masksToBounds = YES;
        [self addSubview:_goButton];
        
        ///订单通知
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.and.right.and.top.equalTo(@0);
        }];
        
        [self.goButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.and.right.equalTo(@0);
            make.top.equalTo(self.titleLabel.mas_bottom).offset(10);
            make.height.equalTo(@32);
        }];
    }
    return self;
}

@end
